﻿<!--修改员工信息-->


<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
	<meta charset="UTF-8">
	<title>Title</title>
	<link rel="stylesheet" href="/static/h-ui.admin/css/bootstrap.min.css">

	<script src="/static/js/jquery-1.8.3.js" th:src="@{/static/js/jquery-1.8.3.js}"></script>
</head>
<body>
<div class="container" id="app">

	<form id="addUserForm">
		<br/>
		<div class="form-group">
			<label for="ename">姓名：</label>
			<input type="text" class="form-control" id="ename" name="ename"  placeholder="输入标题">
		</div>
		<div class="form-group">
			<label for="ephone">联系方式：</label>
			<input type="text" class="form-control" id="ephone" name="ephone" >
		</div>
		<div class="form-group">
			<label for="eposition">职位：</label>
			<input type="text" class="form-control" id="eposition" name="eposition" >
		</div>
		<div class="form-group">
			<label for="eidcard">身份证号：</label>
			<input type="text" class="form-control" id="eidcard" name="eidcard" >
		</div>
		<div class="form-group">
			<label for="emoney">工资：</label>
			<input type="text" class="form-control" id="emoney" name="emoney">
		</div>
		<div class="form-group">
			<label for="esex">性别：</label>
			<input type="text" class="form-control" id="esex" name="esex" >
		</div>
		<div class="form-group">
			<label for="eage">年龄：</label>
			<input type="text" class="form-control" id="eage" name="eage" >
		</div>
		<div>
			<button type="button" id="saveBtn" class="btn btn-success">提交</button>
			<button type="button" id="cancelBtn" class="btn btn-default">取消</button>
		</div>
	</form>
</div>

<script>

	$("#saveBtn").click(function () {
		$.ajax({
			type: 'post',
			dataType: 'json',
			url: '/employee/addEmployee',
			data: {
				ename:$("#ename").val(),
				ephone:$("#ephone").val(),
				eposition:$("#eposition").val(),
				emoney:$("#emoney").val(),
				esex:$("#esex").val(),
				eid:$("#eid").val(),
				eage:$("#eage").val(),
				eidcard:$("#eidcard").val()
			},
			success:function (msg) {
				$("#cancelBtn").click();
			}
		}) ;
	});

	var quxiao=function(){
		var index=parent.layer.getFrameIndex(window.name);
		parent.getEmployeePageList();
		parent.layer.close(index);
	}

	$("#cancelBtn").click(function () {
		quxiao();
	})



</script>
</body>
</html>